
//
//  EllipseView.m
//  NiuProject
//
//  Created by MyMac on 15/10/19.
//  Copyright (c) 2015年 tongfang. All rights reserved.
//

#import "EllipseView.h"
#define LineWith 4.0
@implementation EllipseView
-(void)drawRect:(CGRect)rect{
     CGContextRef ctf=UIGraphicsGetCurrentContext();
    CGContextSetLineWidth(ctf, LineWith);
    CGContextSetStrokeColorWithColor(ctf, self.borderColor.CGColor);
    CGFloat Radius=rect.size.height/2.0-LineWith/2.0;
    CGContextAddArc(ctf,rect.size.height/2.0, rect.size.height/2.0,Radius, -M_PI_2,- M_PI*1.5, 1);
   
    CGContextAddLineToPoint(ctf, rect.size.width-rect.size.height/2.0, rect.size.height-LineWith/2.0);
    CGContextAddArc(ctf, rect.size.width-rect.size.height/2.0, rect.size.height/2.0, Radius, M_PI_2, M_PI*1.5, 1);
    CGContextClosePath(ctf);
    CGContextStrokePath(ctf);

}
@end
